

/** 打开Toast提示 */
export function showToast(title, icon = 'none', duration = 2000) {
  uni.showToast({title, icon, duration})
}

/** 打开确认弹窗 */
export function showModal(content, title = '提示', 
  successCallback = () => {},
  cancelIdleCallback = () => {}
) {
  uni.showModal({
    title,
    content,
    success: function (res) {
      if (res.confirm) {
        successCallback()
      } else if (res.cancel) {
        cancelIdleCallback()
      }
    }
  });
}